package com.bifrost.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the GIFTWRAP_ORDER_ITEM database table.
 *
 * @author joewee
 */
@Entity
@Table(name = "GIFTWRAP_ORDER_ITEM")
@NamedQuery(name = "GiftwrapOrderItem.findAll", query = "SELECT g FROM GiftwrapOrderItem g")
public class GiftwrapOrderItem implements Serializable {


    private static final long serialVersionUID = 4716421462642934162L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "GIFTWRAP_ORDER_ITEM_ID", unique = true, nullable = false)
    private Long giftwrapOrderItemId;

    @Column(name = "QUANTITY", precision = 11)
    private Integer quantity;

    //bi-directional many-to-one association to OrderItem
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ORDER_ITEM_ID", nullable = false,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private OrderItem orderItem;

    //bi-directional many-to-one association to ProductSku
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SKU_ID",foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private ProductSku productSku;

    @Column(name = "SKU_NAME")
    private String giftName;

    @Column(name = "CATEGORY_ID", nullable = false)
    private Long categoryId;

    @Column(name = "PRODUCT_ID", nullable = false)
    private Long productId;

    @Column(name = "SKU_PRICE", nullable = false, precision = 19, scale = 5)
    private BigDecimal skuPrice;

    @Column(name = "SKU_COST", precision = 19, scale = 5)
    private BigDecimal skuCost;

    @Column(name = "SKU_UPC", length = 32)
    private String skuUPC;

    @Column(name = "EXTERNAL_ID", length = 32)
    private String externalId;

    public GiftwrapOrderItem() {
    }

    public Long getGiftwrapOrderItemId() {
        return this.giftwrapOrderItemId;
    }

    public void setGiftwrapOrderItemId(Long giftwrapOrderItemId) {
        this.giftwrapOrderItemId = giftwrapOrderItemId;
    }

    public Integer getQuantity() {
        return this.quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public OrderItem getOrderItem() {
        return this.orderItem;
    }

    public void setOrderItem(OrderItem orderItem) {
        this.orderItem = orderItem;
    }

    public ProductSku getProductSku() {
        return this.productSku;
    }

    public void setProductSku(ProductSku productSku) {
        this.productSku = productSku;
    }

    public String getGiftName() {
        return giftName;
    }

    public void setGiftName(String giftName) {
        this.giftName = giftName;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public BigDecimal getSkuPrice() {
        return skuPrice;
    }

    public void setSkuPrice(BigDecimal skuPrice) {
        this.skuPrice = skuPrice;
    }

    public BigDecimal getSkuCost() {
        return skuCost;
    }

    public void setSkuCost(BigDecimal skuCost) {
        this.skuCost = skuCost;
    }

    public String getSkuUPC() {
        return skuUPC;
    }

    public void setSkuUPC(String skuUPC) {
        this.skuUPC = skuUPC;
    }

    public String getExternalId() {
        return externalId;
    }

    public void setExternalId(String externalId) {
        this.externalId = externalId;
    }
}